package com.ruoyi.zsix.service.impl;

import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.zsix.domain.model.DictDataEntity;
import com.ruoyi.zsix.domain.model.DictTypeEntity;
import com.ruoyi.zsix.mapper.formComponentsMapper.DictMapper;
import com.ruoyi.zsix.service.IDictDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class IDictDataServiceImpl implements IDictDataService {
    @Autowired
    private DictMapper dictMapper;
    /**
     * 查询字典列表
     * @return
     */
    @Override
    public List<DictTypeEntity> getDicts(){
        List<DictTypeEntity> dictDataEntities=dictMapper.getDicts();
        return dictDataEntities;
    }
    /**
     * 根据字典编号，获取字典详情
     * @param dictTypeNo
     * @return
     */
    @Override
    public List<DictDataEntity>  getDictAndData(String dictTypeNo){
        List<DictDataEntity> dictDatas=dictMapper.getDictDatas(dictTypeNo);
        return dictDatas;
    }
}
